load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "router",
    srcs = ["event_router.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/obsservice/obslib/router",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/obsservice/obslib",
        "//pkg/obsservice/obspb",
        "//pkg/util/log",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "router_test",
    srcs = ["event_router_test.go"],
    embed = [":router"],
    deps = [
        "//pkg/obsservice/obslib",
        "//pkg/obsservice/obslib/obsutil",
        "//pkg/obsservice/obspb",
        "//pkg/obsservice/obspb/opentelemetry-proto/common/v1:common",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_stretchr_testify//require",
    ],
)
